package com.yike.common.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Set;

@Data
@Accessors(chain = true)
@ApiModel("登录用户详细信息")
public class LoginUserInfoVo implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("类型：0平台端 1客户端 2商户端 3代理商端")
    private Integer type;

    @ApiModelProperty("用户ID")
    private Long id;

    @ApiModelProperty("用户编号")
    private String userNo;

    @ApiModelProperty("账号")
    private String username;

    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("手机号")
    private String mobile;

    @ApiModelProperty("头像")
    private String headImg;

    @ApiModelProperty("生日")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    @ApiModelProperty("性别 1男 2女 0未知")
    private Integer sex;

    @ApiModelProperty("角色，允许多个")
    private List<RoleVo> roles;

    @ApiModelProperty("权限code")
    private Set<String> permissions;

    @ApiModelProperty("状态：0注销 1正常 2禁用 3冻结 4临时冻结")
    private Integer status;

    @ApiModelProperty("登录认证token, 请求时请在Header配置成：Access-Token")
    private String token;

    @ApiModelProperty("店铺信息")
    private ShopVo shop;

    @ApiModelProperty("代理商id，代理商端登录有返回")
    private Long agentId;

    @ApiModelProperty("代理商编号，代理商端登录有返回")
    private String agentNo;

    @ApiModelProperty("代理商名称，代理商端登录有返回")
    private String agentName;

    @ApiModelProperty("商户id，商户端登录有返回")
    private Long merchantId;

    @ApiModelProperty("商户编号，商户端登录有返回")
    private String merchantNo;

    @ApiModelProperty("店铺ID，选择店铺后有返回")
    private Long shopId;

    @ApiModelProperty("店铺编号，选择店铺后有返回")
    private String shopNo;

    @ApiModelProperty("智通数控userId")
    private Long ztskUserId;

    @ApiModelProperty("智通数控token")
    private String ztskToken;

    @ApiModelProperty("角色ID，平台端有返回")
    private Long roleId;

    @ApiModelProperty("角色名称， 平台端有返回")
    private String roleName;

    @ApiModelProperty("权限菜单， 平台端有返回")
    private List<PlatformMenuTreeVo> menus;

    @ApiModelProperty("按钮权限")
    private List<String> buttonPermissions;

}
